package com.org.cys.service.system;

import com.org.cys.pojo.base.Page;
import com.org.cys.util.PageData;
import java.util.List;

/**
 *  t_system_privilege_roleService接口
 *  @author caiyushen
 */
 
public interface PrivilegeRoleService{
	
	/**
	 * 保存PrivilegeRole
	 * @param PageData
	 * @throws Exception
	 * */
	 void save(PageData pd) throws Exception;

	 /**
	  * 根据privilegeId批量插入PrivilegeRole
	  * @param privilegeId 权限主键
	  * @param dataList 数据集
	  * */
	 void saveBatchByPrivilegeId(List<PageData> dataList,Long privilegeId) throws Exception;

	 /**
	  * 根据roleId批量插入PrivilegeRole
	  * @param roleId 角色主键
	  * @param dataList 数据集 privilegeId roleId
	  * */
	 void saveBatchByRoleId(List<PageData> dataList,Long roleId) throws Exception;

	 /**
	  * 根据privilegeId获取PrivilegeRole
	  * @param privilegeId 权限主键
	  * */
	 List<PageData> getListByPrivilegeId(Long privilegeId) throws Exception;

	 /**
	  * 根据roleId获取PrivilegeRole
	  * @param roleId 角色主键
	  * */
	 List<PageData> getListByRoleId(Long roleId) throws Exception;

 	 /**
	  *	根据privilegeId删除PrivilegeRole
	  * @param privilegeId 权限主键
	  * @throws Exception 
	  * */
	 void deleteByPrivilegeId(Long privilegeId) throws Exception;
	 
 	 /**
	  *	根据roleId删除PrivilegeRole
	  * @param roleId 角色主键
	  * @throws Exception 
	  * */
	 void deleteByRoleId(Long roleId) throws Exception;

	 /**
	  * 根据roleId获取权限数据
	  * @param roleId 角色主键
	  * @param type 权限类别  1:菜单 2:按钮
	  * @throws Exception 
	  * */
	 List<PageData> getPrivilegeListByRoleIdAndType(Long roleId,Integer type) throws Exception;
}
 



